INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
IF(WIN32)
ELSE(WIN32)
	LINK_DIRECTORIES(/usr/local/netcdfcxx/lib)
	LINK_DIRECTORIES(/usr/local/netcdf4/lib)
ENDIF(WIN32)

SET(TARGET_H
    JobManager.h
    WeatherTimer1.h
    WeatherTimer2.h
    WeatherTimer3.h
    WeatherUtil.h
    WeatherDB.h
    Anal1km.h
    Fcst1km.h
    Anal3km.h
    Fcst3km.h
)

SET(TARGET_SRC
	plugin.cpp
    WeatherControler.cpp
    JobManager.cpp
    WeatherTimer1.cpp
    WeatherTimer2.cpp
    WeatherTimer3.cpp
    WeatherUtil.cpp
    WeatherDB.cpp
    Anal1km.cc
    Fcst1km.cc
    Anal3km.cc
    Fcst3km.cc
)

SETUP_GROUP()

SET(TARGET_ADDED_LIBRARIES
    drogon
    trantor
    OCMain
    OCGrib
    OCVolume
    OCNetCDF
    yaml-cpp
)

IF(WIN32)
    SET(TARGET_EXTERNAL_LIBRARIES 
        ws2_32
    )
ELSE(WIN32)	
    SET(TARGET_EXTERNAL_LIBRARIES 
	    netcdf_c++4	
	    netcdf
    )
ENDIF(WIN32)

SETUP_PLUGIN(ControllerZJ)
SETUP_PLUGIN_DEP(ControllerWeather OCMain)
SETUP_PLUGIN_DEP(ControllerWeather OCServer)
SETUP_PLUGIN_DEP(ControllerWeather OCVolume)
SETUP_PLUGIN_DEP(ControllerWeather OCGrib)
SETUP_PLUGIN_DEP(ControllerWeather OCNetCDF)
